package com.hsyt.pms.api.common;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;

import java.io.Serializable;
import java.util.Date;

/**
 * @Description: 
 * @ClassName: ResultVo.java
 * @Package: com.yuntai.med.api.beans.common
* @Author: wangze@hsyuntai.com
 * @Date: 2018年8月14日 下午1:14:14
 * @Copyright: 版权归 Hundsun 所有
 * <ModifyLog>
 * @ModifyContent:
 * @Author:
 * @Date:	
 * </ModifyLog>	
 */
@JsonInclude(Include.NON_NULL)  
public class ResultVo implements Serializable {

    private static final long serialVersionUID = 6543751866024162628L;

    private boolean result;
    private String kind;
    private String msg;
    private Object data;
    private Date nowTime = new Date();	//当前时间

    public ResultVo() {
        this.result = true;
    }

    public ResultVo(boolean result, String kind) {
        this.result = result;
        this.kind = kind;
    }

    public ResultVo(String kind, String msg) {
        this.result = false;
        this.kind = kind;
        this.msg = msg;
    }

    public ResultVo(boolean result, String kind, String msg) {
        this.result = result;
        this.kind = kind;
        this.msg = msg;
    }
    
    public static final ResultVo create() {
        return new ResultVo();
    }

    public static final ResultVo create(boolean result, String kind) {
       return new ResultVo(result, kind);
    }

    public static final ResultVo create(String kind, String msg) {
    	return new ResultVo(kind, msg);
    }

    public static final ResultVo create(boolean result, String kind, String msg) {
    	return new ResultVo(result, kind, msg);
    }

    public String getKind() {
        return kind;
    }

    public void setKind(String kind) {
        this.kind = kind;
    }

    public boolean isResult() {
        return result;
    }

    public void setResult(boolean result) {
        this.result = result;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
    
    
	public Date getNowTime() {
		return nowTime;
	}

	public void setNowTime(Date nowTime) {
		this.nowTime = nowTime;
	}

	public ResultVo(boolean result, Object data, String kind, String msg) {
		this.result = result;
		this.data = data;
		this.kind = kind;
		this.msg = msg;
	}

}
